package com.ruoyi.report.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "repo_table")
public class RepoTable {

    /**
     * 图表ID
     */
    @TableId(value = "repo_id", type = IdType.INPUT)
    private String repoId;
    /**
     * 图表类型
     */
    @TableField(value = "repo_type")
    private RepoTypeEnum repoType;
    /**
     * 查询参数
     */
    @TableField(value = "repo_param")
    private String repoParam;
    /**
     * 整个图表json
     */
    @TableField(value = "repo_json")
    private String repoJson;
    /**
     * Y轴的中文
     */
    @TableField(value = "repo_y_axis")
    private String repoYAxis;

    //定义一个枚举
    public enum RepoTypeEnum {
        ROSE_CHART("玫瑰图"),
        RING_CHART("多环"),
        VERTICAL_BAR_CHART("纵向单轴柱状图"),
        HORIZONTAL_BAR_CHART("横向柱状图"),
        VERTICAL_DUAL_AXIS_BAR_CHART("纵向双轴柱状图"),
        MULTILINE_CHART("多折线图");
        private String value;
        RepoTypeEnum(String value) {
            this.value = value;
        }
    }


}
